from django.contrib import admin

# Register your models here.
from django.contrib.admin import views
from .models import BannerInfo, EmailVerifyCode,UserProfile


class GlobalAdminSetting(admin.ModelAdmin):
    site_title = "牛马之家"
    site_footer = "牛马教育"


class UserProfileXadmin(admin.ModelAdmin):
    list_display = ["nick_name", "birthday", "gender","address","phone","is_start","add_time"]


class BannerInfoXadmin(admin.ModelAdmin):
    list_display = ["image", "url", "add_time"]
    search_fields = ["image", "url"]
    list_filter = ["image", "url"]


class EmailVerifyCodeXadmin(admin.ModelAdmin):
    list_display = ["code", "email", "send_type", "add_time"]


admin.site.register(UserProfile, UserProfileXadmin)
admin.site.register(BannerInfo, BannerInfoXadmin)
admin.site.register(EmailVerifyCode, EmailVerifyCodeXadmin)
admin.site.index_title = "牛马管理"
admin.site.site_header = "牛马之家"
